<?php
namespace app\index\controller;
use think\Controller;

/**
* 
*/
class Utiltool extends Controller
{
	private $data;
	public function __construct($data)
	{
		parent::__construct();
		$this->data = $data;
	}

	public function getdata () {
		$result;
		$data = $this->data;
		if($data) {
			$result = array(
				'status'	=>	0,
				'reason'	=>	'Success',
				'result'	=>	$data
			);
		}else {
			$result = array(
				'status'	=>	1,
				'reason'	=>	'Error',
				'result'	=>	null
			);
		}
		return json_encode($result);
	}
}
?>